/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Calendar;

/**
 * <p>Project: jse2303 - Ex2</p>
 * <p>Powered by webrx On 2023-07-27 09:13:47</p>
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex2 {
    public static void main(String[] args) {
        //月末
        Calendar c = Calendar.getInstance();
        System.out.printf("%tF %<tT%n", c);
        int m = c.get(Calendar.MONTH);
        System.out.println(m);
        c.set(c.get(Calendar.YEAR), m + 1, 1, 0, 0, 0);
        c.add(Calendar.HOUR_OF_DAY, -22);
        System.out.printf("%tF %<tT%n", c);


    }
}
